package com.woniu.user.mqlistener;

import com.woniu.user.service.AccountService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@RocketMQMessageListener(topic = "register-check-topic", consumerGroup = "registercheck")
@Slf4j
public class RegisterCheckListener implements RocketMQListener<String> {
    @Resource
    private AccountService accountService;
    @Override
    public void onMessage(String mail) {
        accountService.closeRegister(mail);
    }
}
